package com.laomuji.android.mvvm.http.observer

import retrofit2.HttpException

/**
 * 内部响应监听
 * @author laomuji666
 * @since 2024/2/20
 */
abstract class ServiceObserver<T> : BaseObserver<T>() {
    override fun onError(e: Throwable) {
        if (e is HttpException && e.code() == 401) {
            //TODO 跳转登录
        } else {
            super.onError(e)
        }
    }
}